<%@ Page Language="C#" MasterPageFile="~/pages/MasterPage.master" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="pages_register" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table>
        <tr>
            <td style="width: 117px">
                Username:</td>
            <td style="width: 100px">
                <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox></td>
            <td style="width: 100px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtUsername"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 117px">
                Password:</td>
            <td style="width: 100px">
                <asp:TextBox ID="txtPassword" runat="server"></asp:TextBox></td>
            <td style="width: 100px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtPassword"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 117px; height: 26px">
                Confirm password:</td>
            <td style="width: 100px; height: 26px">
                <asp:TextBox ID="txtConfirmPass" runat="server"></asp:TextBox></td>
            <td style="width: 100px; height: 26px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtConfirmPass"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="The password and confirm password are not the same"
                    ValidationGroup="reg" Width="221px" ControlToCompare="txtPassword" ControlToValidate="txtConfirmPass"></asp:CompareValidator></td>
        </tr>
        <tr>
            <td style="width: 117px">
                First name:</td>
            <td style="width: 100px">
                <asp:TextBox ID="txtFirstname" runat="server"></asp:TextBox></td>
            <td style="width: 100px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtFirstname"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 117px">
                Last name:</td>
            <td style="width: 100px">
                <asp:TextBox ID="txtLastname" runat="server"></asp:TextBox></td>
            <td style="width: 100px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtLastname"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 117px; height: 40px">
                Email:</td>
            <td style="width: 100px; height: 40px">
                <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></td>
            <td style="width: 100px; height: 40px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Invalid email"
                    ValidationGroup="reg" ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td style="width: 117px; height: 26px">
                Phone:</td>
            <td style="width: 100px; height: 26px">
                <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></td>
            <td style="width: 100px; height: 26px">
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Invalid phone number"
                    ValidationGroup="reg" ControlToValidate="txtPhone" ValidationExpression="(\(\d{3}\)|\d{3}-)?\d{8}"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td style="width: 117px">
                Address</td>
            <td style="width: 100px">
                <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox></td>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 117px">
                Card type:</td>
            <td style="width: 100px">
                <asp:DropDownList ID="cmbCardType" runat="server">
                </asp:DropDownList></td>
            <td style="width: 100px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="cmbCardType"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width: 117px">
                Card number:</td>
            <td style="width: 100px">
                <asp:TextBox ID="txtCartNumber" runat="server"></asp:TextBox></td>
            <td style="width: 100px">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Required"
                    ValidationGroup="reg" ControlToValidate="txtCartNumber"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="Invalid card number"
                    ValidationGroup="reg" ControlToValidate="txtCartNumber" ValidationExpression="\d{5}(-\d{4})?"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td style="width: 117px">
            </td>
            <td colspan="2">
                <asp:Button ID="btnRegister" runat="server" Text="Register" OnClick="btnRegister_Click" />
                <asp:Button ID="btnReset" runat="server" Text="Reset" /></td>
        </tr>
    </table>
    <br />
    &nbsp;<br />
</asp:Content>

